<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<script type="text/javascript">
	function checkForm(){
		var gradeName=$("#gradeName").val();
		if(gradeName==null||gradeName==""){
			$("#error").html("年级名称不能为空！");
			return false;
		}
		return true;
	}
</script>
<div class="data_list">
	<div class="data_content">
		<form class="form-horizontal" action="grade!save" method="post" onsubmit="return checkForm()">
		  <div class="control-group">
		    <label class="control-label" style="padding-left: 200px;">年级名称：</label>
		    <div class="controls">
		      <input type="text" id="gradeName" name="grade.gradeName" value="${grade.gradeName }"/>
		    </div>
		  </div>
		  <div class="control-group">
		    <label class="control-label" style="padding-left: 200px;">年级描述：</label>
		    <div class="controls">
		      <textarea rows="5" cols="10" id="gradeDesc" name="grade.gradeDesc">${grade.gradeDesc }</textarea>
		    </div>
		  </div>
		  <div class="control-group">
		    <div class="controls" style="padding-left: 200px;">
		      <input type="hidden" id="gradeId" name="gradeId" value="${grade.gradeId }"/><input type="submit" class="btn btn-primary" value="保存"/></td>&nbsp;&nbsp;
				<button class="btn btn-primary" type="button" onclick="javascript:history.back()">返回</button>&nbsp;&nbsp;<font id="error" color="red">${error }</font>
		    </div>
		  </div>
		</form>
	</div>
</div>
